Changeset 301 for trunk/debian/rootfs


Ignore:
Timestamp:
Aug 14, 2011, 6:51:44 PM (8 years ago)
Author:
amain
Message:

rootfs: fix post install to install debwrt cross compiled packages

Location:
trunk/debian/rootfs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/rootfs/debian.mk

    r250 r301  
    8383        touch $@
    8484
    85 # install all available cross-compiled debwrt debian packages, extect for the kernel-headers packages because it is to big
     85# install all available cross-compiled debwrt debian packages, except for the kernel-headers package and the cross packages
    8686debian/rootfs/debwrt-packages: debian/rootfs/bootstrap debian/package/rootfs
    87         ls ${INSTALL_DIR_DEBIAN_PACKAGES}/*.deb | grep -v "debwrt-kernel-headers" | while read package; do \
     87        ls ${INSTALL_DIR_DEBIAN_PACKAGES}/*.deb | grep -v "debwrt-kernel-headers" | grep -v "cross" | while read package; do \
    8888                pfname=`basename $$package`; \
    8989                pname=`echo $$pfname | sed 's/_.*//'`; \
     
    9292                sudo dpkg-deb -x $$package $(ROOTFS_BUILD_DIR); \
    9393                sudo bash -c "echo \"$$pname /var/cache/apt/archives/$$pfname\" >>$(ROOTFS_BUILD_DIR)/debootstrap/debpaths" ;\
     94                sudo sed -i 's/$$/ $$pfname/' $(ROOTFS_BUILD_DIR)/debootstrap/base ;\
    9495        done
    9596        touch $@
     
    102103debian/rootfs/post-setup: debian/rootfs/bootstrap
    103104        sudo mkdir -p $(ROOTFS_BUILD_DIR)/etc/apt
     105        # note: unfortunately /etc/apt/sources.list is cleaned after running second stage install
    104106        sudo bash -c "echo \"deb $(call qstrip,$(DEBIAN_BUILDENV_REPOSITORY)) $(DEBIAN_BUILD_VERSION) main\" > $(ROOTFS_BUILD_DIR)/etc/apt/sources.list"
     107        sudo bash -c "echo \"$(DEBWRTVERSION)\" >$(ROOTFS_BUILD_DIR)/etc/debwrt_version"
     108        sudo bash -c "echo \"$(DEBIAN_BUILD_VERSION)\" >$(ROOTFS_BUILD_DIR)/etc/debian_release"
    105109        touch $@
    106110
     
    114118        rm -f debian/package/rootfs
    115119        rm -f debian/package/*/deliver
    116 
    117 # l l
  • trunk/debian/rootfs/files/etc/init.d/rcS.firstboot

    r252 r301  
    4141/bin/echo "Note that both telnetd and sshd are running on: 192.168.1.1 and on 192.168.1.20."
    4242/bin/echo
    43 /bin/echo "Second stage install instructions:"
    44 /bin/echo
    45 /bin/echo "  /debootstrap/debootstrap --second-stage  ;"
    46 /bin/echo "  rm -rf /var/cache/apt/archives  ;"
    47 /bin/echo "  mkdir -p /var/cache/apt/archives/partial  ;"
    48 /bin/echo "  echo \"deb http://ftp.debian.org/debian squeeze main\" >>/etc/apt/sources.list"
    49 /bin/echo "# OR"
    50 /bin/echo "- echo \"deb http://ftp.debian.org/debian sid main\" >>/etc/apt/sources.list"
    51 /bin/echo "- for Lenny: dpkg-reconfigure dash"
    52 /bin/echo
    53 /bin/echo " Don't execute these lines, these are a reminder for myself(amain) when preparing an DebWrt release:"
    54 /bin/echo "- rm -rf /lib/modules/*"
    55 /bin/echo "- rm -rf /lib/firmware/*"
    56 /bin/echo
     43/bin/echo "Run /usr/sbin/PostInstall to complete the second stage installation"
     44
     45# Start bash
    5746/bin/bash
    5847
  • trunk/debian/rootfs/files/usr/sbin/PostInstall

    r257 r301  
    11#!/bin/bash
    22#
    3 # PostInstall
    4 # to complete the installation
    5 # original mostly a wrapper for second stage debootstrap
     3# DebWrt PostInstall
    64#
    7 # Copyright (C) 2011  Geert Stappers  <stappers@stappers.nl>
     5# Copyright (C) 2011 Geert Stappers  <stappers@stappers.nl>
     6# Copyright (C) 2011 Johan van Zoomeren <amain@debwrt.net>
     7#
    88# Licenced GNU General Public License v2
    9 #
    109
    1110if [ -x /debootstrap/debootstrap ] ; then
    12   echo FYI: Running second stage of debootstap, which does take some time
     11  echo "I: Running second stage of debootstap (may take some time)"
    1312  /debootstrap/debootstrap --second-stage
     13
     14  echo "I: Cleaning up /var/cache/apt/archives"
    1415  rm -rf /var/cache/apt/archives
    1516  mkdir -p /var/cache/apt/archives/partial
    1617else
    17   echo No debootstrap executable found, assuming "second stage" is allready done
    18   # exit 0
    19 fi 
     18  echo "W: No debootstrap executable found, assuming 'second stage debootstrap' is allready done"
     19fi
     20
     21if [ ! -s /etc/apt/sources.list ]; then
     22   debian_release=$( cat /etc/debian_release )
     23   echo "I: setting up /etc/apt/sources.list for ${debian_release}"
     24   cat >/etc/apt/sources.list <<EOF
     25deb http://ftp.debian.org/debian ${debian_release} main
     26EOF
     27fi
    2028
    2129if [ -f /etc/init.d/rcS ] ; then
    2230  # the symbolic link to /etc/init.d/rcS.firstboot is gone
    23   if [ $( diff /etc/init.d/rcS /etc/init.d/rcS.debian 2>&1 | wc -l ) -gt 0 ]
    24   then
    25     : # do nothing
    26   else
     31  if ! diff -q /etc/init.d/rcS /etc/init.d/rcS.debian; then
    2732    # they are equal
    2833    rm /etc/init.d/rcS.debian
     
    3540  cat << HERE
    3641
    37 Warning: Kernel modules top directory /lib/modules/$( uname -r ) NOT found!
    38   See /lib/modules/debwrt.README for more information.
     42W: Kernel modules top directory /lib/modules/$( uname -r ) NOT found!
     43   See /lib/modules/debwrt.README for more information.
    3944
    4045HERE
     
    4247
    4348if [ -x /usr/sbin/in.telnetd ] ; then
    44   echo Warning: telnet daemon programm found, consider uninstalling it.
     49  echo "W: telnet daemon programm found, consider uninstalling it."
    4550  echo
    4651fi
    4752
    48 # FYI: This program did NOT check NOR setup network switch configuration
     53# note: This program did NOT check NOR setup network switch configuration
    4954
    50 echo 'Minor reminider: run `dpkg-reconfigure locales`'
     55echo -n "I: syncing disks...."
     56sync
     57echo "done"
    5158echo
    5259
    53 # l l
     60cat <<EOF
     61
     62I: Next step is configuring the network and run apt-get update. Have fun!!
     63
     64EOF
Note: See TracChangeset for help on using the changeset viewer.