diff options
-rw-r--r-- | classes/wrt-image.bbclass | 34 | ||||
-rw-r--r-- | conf/machine/wrt54.conf | 22 | ||||
-rw-r--r-- | packages/linux/linux-wrt_2.4.30.bb | 119 | ||||
-rw-r--r-- | packages/lzma/files/lzma-406-zlib-stream.patch | 0 | ||||
-rw-r--r-- | packages/lzma/lzma-native_4.17.bb | 19 | ||||
-rw-r--r-- | packages/meta/nylon-image-mini.bb | 6 | ||||
-rw-r--r-- | packages/netbase/netbase/wrt54/interfaces | 19 | ||||
-rw-r--r-- | packages/python/python-pygtk_2.2.0.bb | 3 | ||||
-rw-r--r-- | packages/squashfs-tools/files/squashfs2.0-tools-lzma.patch | 0 | ||||
-rw-r--r-- | packages/squashfs-tools/squashfs-tools-native_2.0r2.bb | 12 | ||||
-rw-r--r-- | packages/squashfs-tools/squashfs-tools_2.0r2.bb | 9 |
11 files changed, 233 insertions, 10 deletions
diff --git a/classes/wrt-image.bbclass b/classes/wrt-image.bbclass index e69de29bb2..f6ca5bcb19 100644 --- a/classes/wrt-image.bbclass +++ b/classes/wrt-image.bbclass @@ -0,0 +1,34 @@ +# we dont need the kernel in the image +ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/zImage*" + +def wrt_get_kernel_version(d): + import bb + if not bb.data.inherits_class('native', d): + skd = bb.data.getVar('STAGING_KERNEL_DIR', d, 1) + return base_read_file(skd+'/kernel-abiversion') + return "-no kernel version for native-" + +KERNEL_VERSION = "${@wrt_get_kernel_version(d)}" + +wrt_create_images() { + I=${DEPLOY_DIR}/images + + for type in ${IMAGE_FSTYPES}; do + # generic + trx -o ${I}/wrt-generic-${type}.trx ${I}/loader.gz \ + ${I}/wrt-kernel-${KERNEL_VERSION}.lzma -a 0x10000 ${I}/${IMAGE_NAME}.rootfs.${type} + + # WRT54GS + addpattern -2 -i ${I}/wrt-generic-${type}.trx -o ${I}/wrt54gs-${type}.trx -g + + # WRT54G + sed "1s,^W54S,W54G," ${I}/wrt54gs-${type}.trx > ${I}/wrt54g-${type}.trx + + # motorola + motorola-bin ${I}/wrt-generic-${type}.trx ${I}/motorola-${type}.bin + done; +} + +IMAGE_POSTPROCESS_COMMAND += "wrt_create_images;" + +DEPENDS += "wrt-imagetools"
\ No newline at end of file diff --git a/conf/machine/wrt54.conf b/conf/machine/wrt54.conf index 4df924d07c..856ca97013 100644 --- a/conf/machine/wrt54.conf +++ b/conf/machine/wrt54.conf @@ -8,12 +8,26 @@ IPKG_ARCHS = "all mipsel ${MACHINE}" SERIAL_CONSOLE = "tts/0" -BOOTSTRAP_EXTRA_DEPENDS = "virtual/kernel" -BOOTSTRAP_EXTRA_RDEPENDS = "kernel-module-wl kernel-module-et kernel-module-wlcompat wrt-init wrt-utils" -BOOTSTRAP_EXTRA_RRECOMMENDS = "" +BOOTSTRAP_EXTRA_DEPENDS += "virtual/kernel" +BOOTSTRAP_EXTRA_RDEPENDS += "kernel-module-wl kernel-module-et kernel-module-wlcompat" +BOOTSTRAP_EXTRA_RDEPENDS += "wrt-init wrt-utils" +BOOTSTRAP_EXTRA_RRECOMMENDS += "" PREFERRED_PROVIDER_virtual/kernel = "linux-wrt" +# build jffs2 and squashfs-lzma images +IMAGE_FSTYPES = "squashfs-lzma jffs2" + EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash --eraseblock=0x10000 -n" -INHERIT += "wrt-image"
\ No newline at end of file +# squashfs-lzma image type (could be in bitbake.conf like the others) +IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native" +IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend" +EXTRA_IMAGECMD_squashfs-lzma = "-root-owned -le" + +# build trx images +INHERIT += "wrt-image" + +# strip even more: +DEPENDS += "elfkickers-native" +export STRIP = "sstrip"
\ No newline at end of file diff --git a/packages/linux/linux-wrt_2.4.30.bb b/packages/linux/linux-wrt_2.4.30.bb index e69de29bb2..730c9c3cd7 100644 --- a/packages/linux/linux-wrt_2.4.30.bb +++ b/packages/linux/linux-wrt_2.4.30.bb @@ -0,0 +1,119 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for the Linksys WRT54 devices" +HOMEPAGE = "http://openwrt.org" +LICENSE = "GPL" +PR = "r1" + +SRC_URI = "http://www.fi.kernel.org/pub/linux/kernel/v2.4/linux-2.4.30.tar.bz2 \ + cvs://anonymous@openwrt.org/openwrt;module=openwrt/package/linux/kernel-source;tag=TESTED \ + http://downloads.openwrt.org/kernel-binary-wl-0.2.tar.gz \ + http://downloads.openwrt.org/kernel-source-et-0.6.tar.gz \ + file://000-linux-mips-2_4_30.patch;patch=1 \ + file://001-Makefile;patch=1 \ + file://002-Rules_make;patch=1 \ + file://003-arch_mips_Makefile;patch=1 \ + file://005-arch_mips_config-shared_in;patch=1 \ + file://007-arch_mips_kernel_cpu-probe_c;patch=1 \ + file://009-arch_mips_kernel_head_S;patch=1 \ + file://010-arch_mips_kernel_proc_c;patch=1 \ + file://011-arch_mips_kernel_setup_c;patch=1 \ + file://012-arch_mips_kernel_traps_c;patch=1 \ + file://017-arch_mips_pci_Makefile;patch=1 \ + file://018_drivers_char_mem_c;patch=1 \ + file://019-drivers_char_serial_c;patch=1 \ + file://020-drivers_mtd-jumbo;patch=1 \ + file://021-drivers_net_Config_in-hnd;patch=1 \ + file://022-drivers_net_Makefile;patch=1 \ + file://023-drivers_parport_Makefile;patch=1 \ + file://024-drivers_parport_Config_in;patch=1 \ + file://028-drivers_pcmcia_Makefile;patch=1 \ + file://029-arch_mips_mm_c-r4k_c;patch=1 \ + file://031-include_asm-mips_bootinfo_h;patch=1 \ + file://033-include_asm-mips_cpu_h;patch=1 \ + file://036-include_asm-mips_serial_h;patch=1 \ + file://037-init_do_mounts_c;patch=1 \ + file://100-gcc3-mtune;patch=1 \ + file://200-include_linux_netdevice_h.patch;patch=1 \ + file://201-include_linux_skbuff_h.patch;patch=1 \ + file://202-net_core_Makefile.patch;patch=1 \ + file://203-net_core_dev_c.patch;patch=1 \ + file://204-net_sched_sched_api_c.patch;patch=1 \ + file://205-net_sched_sched_generic_c.patch;patch=1 \ + file://206-include_net_pkt_sched_h.patch;patch=1 \ + file://207-hfsplus-fix;patch=1 \ + file://208-gcc-3.4-fix;patch=1 \ + file://300-squashfs2.1;patch=1 \ + file://301-jffs-compression;patch=1 \ + file://302-ebtables;patch=1 \ + file://303-mppe-mppc;patch=1 \ + file://304-netfilter-ipp2p-0.7.4;patch=1 \ + file://305-cifs-1.20c;patch=1 \ + file://306-netfilter-layer7-0.9.1;patch=1 \ + file://307-gcc-3.4-fix.patch;patch=1 \ + file://308-netfilter-nat-pptp;patch=1 \ + file://309-drivers_net_b44_c.patch;patch=1 \ + file://310-netfilter-maxconn;patch=1 \ + file://311-ipsec-nat-traversal;patch=1 \ + file://312-netfilter-TTL;patch=1 \ + file://313-gcc-4.0-fixes;patch=1 \ + file://314-drivers_net_b44_h.patch;patch=1 \ + file://315-include_linux_pci_ids_h.patch;patch=1 \ + file://316-b44_mii_phy.patch;patch=1 \ + file://400-i4l-cvs-2-4-29;patch=1 \ + file://401-hfc-usb-backport-i4l-cvs;patch=1 \ + file://402-pl2303-backport-2-4-29;patch=1 \ + file://403-netdev_random_core.patch;patch=1 \ + file://404-netdev_random_et.patch;patch=1 \ + file://600-linux-squashfs-lzma;patch=1 \ + file://600-optional-aout-support;patch=1 \ + file://linux.config" + +S = "${WORKDIR}/linux-2.4.30" + +COMPATIBLE_HOST = 'mipsel.*-linux' + +inherit kernel + +KERNEL_IMAGETYPE ?= "zImage" +KERNEL_OUTPUT = "arch/mips/brcm-boards/bcm947xx/compressed/piggy" +CMDLINE = "root=/dev/mtdblock2 rootfstype=squashfs,jffs2 console=ttyS0,115200" + +KERNEL_OBJECT_SUFFIX = ".o" ### should be auto + +export CFLAGS_KERNEL="-fno-delayed-branch " + +do_unpack_extra(){ + # copy kernel source which is maintained in openwrt via cvs + cp -a ${WORKDIR}/kernel-source/* ${S} + # copy binary wlan driver + cp -a ${WORKDIR}/wl/*.o ${S}/drivers/net/wl + # copy proprietary et source + cp -a ${WORKDIR}/et/* ${S}/drivers/net/et + cp -a ${WORKDIR}/et/*.h ${S}/include/ +} +addtask unpack_extra after do_unpack before do_patch + +do_configure_prepend() { + install -m 0644 ${WORKDIR}/linux.config ${S}/.config + echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config + + sed -i -e 's/@expr length/@-expr length/' ${S}/Makefile + sed -i -e "s,\-mcpu=,\-mtune=,g;" ${S}/arch/mips/Makefile +} + +do_deploy() { + install -d ${DEPLOY_DIR}/images + cat ${KERNEL_OUTPUT} | lzma e -si -so -eos > \ + ${DEPLOY_DIR}/images/wrt-kernel-${PV}.lzma +} + +do_deploy[dirs] = "${S}" + +addtask deploy before do_build after do_compile + +python () { + # Don't build openslug kernel unless we're targeting a wrt + mach = bb.data.getVar("MACHINE", d, 1) + if mach != 'wrt54': + raise bb.parse.SkipPackage("Unable to build for non-WRT54 device.") +} diff --git a/packages/lzma/files/lzma-406-zlib-stream.patch b/packages/lzma/files/lzma-406-zlib-stream.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/lzma/files/lzma-406-zlib-stream.patch diff --git a/packages/lzma/lzma-native_4.17.bb b/packages/lzma/lzma-native_4.17.bb index e69de29bb2..a47cd1d8da 100644 --- a/packages/lzma/lzma-native_4.17.bb +++ b/packages/lzma/lzma-native_4.17.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression." +HOMEPAGE = "http://www.7-zip.org/" +LICENSE = "LGPL" + +SRC_URI = "http://www.7-zip.org/dl/lzma417.tar.bz2 \ + file://lzma-406-zlib-stream.patch;patch=1" +S = "${WORKDIR}" + +inherit native + +do_compile() { + make -C ${S}/SRC/7zip/Compress/LZMA_Alone + make -C ${S}/SRC/7zip/Compress/LZMA_Lib +} + +do_stage () { + install -m 0755 ${S}/SRC/7zip/Compress/LZMA_Alone/lzma ${STAGING_BINDIR} + oe_libinstall -a ${S}/SRC/7zip/Compress/LZMA_Lib/liblzma ${STAGING_LIBDIR} +} diff --git a/packages/meta/nylon-image-mini.bb b/packages/meta/nylon-image-mini.bb index 6b1d800ab9..9e7e0552e4 100644 --- a/packages/meta/nylon-image-mini.bb +++ b/packages/meta/nylon-image-mini.bb @@ -1,6 +1,7 @@ -export IMAGE_BASENAME = "nylon-base" +export IMAGE_BASENAME = "nylon-mini" NYLON_BASE = "base-files base-passwd busybox \ + dropbear \ miniinit \ netbase \ wireless-tools" @@ -15,8 +16,5 @@ export IPKG_INSTALL = "${RDEPENDS}" IMAGE_LINGUAS = "" -# we dont need the kernel in the image -ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/boot/zImage*" - inherit image_ipk LICENSE = "MIT" diff --git a/packages/netbase/netbase/wrt54/interfaces b/packages/netbase/netbase/wrt54/interfaces index e69de29bb2..5925aa0294 100644 --- a/packages/netbase/netbase/wrt54/interfaces +++ b/packages/netbase/netbase/wrt54/interfaces @@ -0,0 +1,19 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# loopback interface +auto lo +iface lo inet loopback + +# ethernet interface +auto eth0 +iface eth0 inet static + address 192.168.1.1 + netmask 255.255.255.0 + +# wireless interface +auto eth1 +iface eth1 inet static + wireless_mode master + wireless_essid wrt + address 192.168.0.1 + netmask 255.255.255.0 diff --git a/packages/python/python-pygtk_2.2.0.bb b/packages/python/python-pygtk_2.2.0.bb index 453b323847..16d8676282 100644 --- a/packages/python/python-pygtk_2.2.0.bb +++ b/packages/python/python-pygtk_2.2.0.bb @@ -3,9 +3,10 @@ SECTION = "devel/python" PRIORITY = "optional" MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>" DEPENDS = "gtk+ libglade" +RDEPENDS = "python-shell" SRCNAME = "pygtk" LICENSE = "LGPL" -PR = "r2" +PR = "r3" SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.2/${SRCNAME}-${PV}.tar.bz2" S = "${WORKDIR}/${SRCNAME}-${PV}" diff --git a/packages/squashfs-tools/files/squashfs2.0-tools-lzma.patch b/packages/squashfs-tools/files/squashfs2.0-tools-lzma.patch new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/squashfs-tools/files/squashfs2.0-tools-lzma.patch diff --git a/packages/squashfs-tools/squashfs-tools-native_2.0r2.bb b/packages/squashfs-tools/squashfs-tools-native_2.0r2.bb index e69de29bb2..569bf8dad2 100644 --- a/packages/squashfs-tools/squashfs-tools-native_2.0r2.bb +++ b/packages/squashfs-tools/squashfs-tools-native_2.0r2.bb @@ -0,0 +1,12 @@ +SECTION = "base" +PN_BASE = "squashfs-tools" +include ${PN_BASE}_${PV}.bb +inherit native + +FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${PN_BASE}-${PV}', '${FILE_DIRNAME}/${PN_BASE}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" +PACKAGES = "" + +do_stage () { + install -m 0755 mksquashfs ${STAGING_BINDIR}/ + install -m 0755 mksquashfs-lzma ${STAGING_BINDIR}/ +} diff --git a/packages/squashfs-tools/squashfs-tools_2.0r2.bb b/packages/squashfs-tools/squashfs-tools_2.0r2.bb index 601724a5cb..f99cdb798e 100644 --- a/packages/squashfs-tools/squashfs-tools_2.0r2.bb +++ b/packages/squashfs-tools/squashfs-tools_2.0r2.bb @@ -4,12 +4,19 @@ MAINTAINER = "Chris Larson <kergoth@handhelds.org>" LICENSE = "GPLv2" SRC_URI = "${SOURCEFORGE_MIRROR}/squashfs/squashfs${@bb.data.getVar('PV',d,1).replace('r','-r')}.tar.gz \ - file://flags.patch;patch=1" + file://flags.patch;patch=1 \ + file://squashfs2.0-tools-lzma.patch;patch=1" S = "${WORKDIR}/squashfs${PV}/squashfs-tools" prefix = "" +do_compile() { + oe_runmake + oe_runmake mksquashfs-lzma +} + do_install () { install -d ${D}${sbindir} install -m 0755 mksquashfs ${D}${sbindir}/ + install -m 0755 mksquashfs-lzma ${D}${sbindir}/ } |