Merge bk://oe-devel.bkbits.net/openembedded
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>
Sun, 12 Jun 2005 21:40:09 +0000 (21:40 +0000)
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>
Sun, 12 Jun 2005 21:40:09 +0000 (21:40 +0000)
into  bkbits.net:/repos/n/nslu2-linux/openembedded

2005/06/12 23:35:14+02:00 uni-frankfurt.de!mickeyl
Merge bk://oe-devel@oe-devel.bkbits.net/openembedded
into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages

2005/06/12 22:51:57+02:00 (none)!br1
wrt cleanup

2005/06/12 22:49:31+02:00 (none)!br1
Merge bk://oe-devel@oe-devel.bkbits.net/openembedded
into null.(none):/data/mtx/src/build/unstable.wrt/openembedded

2005/06/12 22:02:49+02:00 (none)!br1
add squashfs-lzma patches for smaller wrt images

2005/06/12 17:25:32+02:00 (none)!br1
wrt updates: create squashfs and jffs2 images

2005/06/12 16:35:25+02:00 uni-frankfurt.de!mickeyl
Merge bk://oe-devel@oe-devel.bkbits.net/openembedded
into r2d2.tm.informatik.uni-frankfurt.de:/local/pkg/oe/packages

2005/06/12 14:43:00+02:00 uni-frankfurt.de!mickeyl
pygtk rdepends on python-shell

BKrev: 42acabb9DYchxo1fFJnbe2sjmsq4GQ

classes/wrt-image.bbclass
conf/machine/wrt54.conf
packages/linux/linux-wrt_2.4.30.bb
packages/lzma/files/lzma-406-zlib-stream.patch [new file with mode: 0644]
packages/lzma/lzma-native_4.17.bb
packages/meta/nylon-image-mini.bb
packages/netbase/netbase/wrt54/interfaces
packages/python/python-pygtk_2.2.0.bb
packages/squashfs-tools/files/squashfs2.0-tools-lzma.patch [new file with mode: 0644]
packages/squashfs-tools/squashfs-tools-native_2.0r2.bb
packages/squashfs-tools/squashfs-tools_2.0r2.bb

index e69de29..f6ca5bc 100644 (file)
@@ -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
index 4df924d..856ca97 100644 (file)
@@ -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
index e69de29..730c9c3 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index e69de29..a47cd1d 100644 (file)
@@ -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}
+}
index 6b1d800..9e7e055 100644 (file)
@@ -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"
index e69de29..5925aa0 100644 (file)
@@ -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
index 453b323..16d8676 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index e69de29..569bf8d 100644 (file)
@@ -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}/
+}
index 601724a..f99cdb7 100644 (file)
@@ -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}/
 }