From 1c34ed8a1c6d668d1881ad8f96e5d99c91ead6a0 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Tue, 20 Jun 2017 16:24:21 +0200 Subject: Premier essai avec LEDE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Manque: - les dépôts locaux, - motd - Nettoyer le code sur la partie profile --- build-openwrt-dev.sh | 112 +++++++++++++++++++++++++-------------------------- maj/gen-dev.php | 14 +++---- maj/gen.php | 2 +- 3 files changed, 64 insertions(+), 64 deletions(-) diff --git a/build-openwrt-dev.sh b/build-openwrt-dev.sh index 5977122..41e4129 100755 --- a/build-openwrt-dev.sh +++ b/build-openwrt-dev.sh @@ -22,10 +22,10 @@ echo -n "$0 - " ; date # Directories and source file URL BUILD_DIR=${BUILD_DIR:-./build} CACHE_DIR=${CACHE_DIR:-.} -ORIG_TARBALL=OpenWrt-ImageBuilder-9a1fd3e-ar71xx-generic.Linux-x86_64.tar.bz2 -ORIG_URL=http://stg2.chd.sx/openwrt/chaos_calmer/15.05.1/ar71xx/generic/$ORIG_TARBALL -PACKAGES="luci luci-mod-admin-full ip" # Base packages -PACKAGES="$PACKAGES luci-i18n-base-en luci-i18n-firewall-en luci-i18n-base-fr luci-i18n-firewall-fr" # internationnalisation +ORIG_TARBALL=lede-imagebuilder-17.01.2-ar71xx-generic.Linux-x86_64.tar.xz +ORIG_URL=https://downloads.lede-project.org/releases/17.01.2/targets/ar71xx/generic/$ORIG_TARBALL +PACKAGES="luci luci-mod-admin-full ip kmod-leds-gpio" # Base packages +PACKAGES="$PACKAGES luci-i18n-base-en luci-i18n-firewall-en luci-i18n-base-fr luci-i18n-firewall-fr" # internationalisation PACKAGES="$PACKAGES -kmod-ppp -kmod-pppoe -kmod-pppox" # Unusefull kernel modules PACKAGES="$PACKAGES -luci-proto-ppp -ppp -ppp-mod-pppoe -odhcp6c" # Unusefull packages @@ -38,13 +38,13 @@ fi dnslist="185.131.40.1 fe80::31" profile=$1 -case "$profile" in - TLWR740|TLWR841) - ;; - *) echo "Unsupported profile '$profile', should be TLWR740 or TLWR841" - exit 2 - ;; -esac +# case "$profile" in +# TLWR740|TLWR841) +# ;; +# *) echo "Unsupported profile '$profile', should be TLWR740 or TLWR841" +# exit 2 +# ;; +# esac ip4pub=$2 case "$ip4pub" in @@ -100,19 +100,19 @@ if [ ! -f "$BUILD_DIR/Makefile" ]; then fi tar -x -C "$BUILD_DIR/" --strip-components=1 -f "$CACHE_DIR/$ORIG_TARBALL" # Hotfix about "logd" package not availble on chaos-calmer - patch -d "$BUILD_DIR/" -p1 <<"EOT" ---- a/include/target.mk 2017-04-01 22:00:23.000000000 +0200 -+++ b/include/target.mk 2017-04-03 20:01:23.620028730 +0200 -@@ -12,7 +12,7 @@ - DEVICE_TYPE?=router +# patch -d "$BUILD_DIR/" -p1 <<"EOT" +# --- a/include/target.mk 2017-04-01 22:00:23.000000000 +0200 +# +++ b/include/target.mk 2017-04-03 20:01:23.620028730 +0200 +# @@ -12,7 +12,7 @@ +# DEVICE_TYPE?=router - # Default packages - the really basic set --DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools logd -+DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools - # For nas targets - DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm - # For router targets -EOT +# # Default packages - the really basic set +# -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools logd +# +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools +# # For nas targets +# DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm +# # For router targets +# EOT fi cd "$BUILD_DIR/" || exit 5 @@ -123,23 +123,23 @@ mkdir -p extra_files/etc/config extra_files/etc/dropbear extra_files/etc/hotplug # Prepare Openwrt config file # ############################### -# Use local replication of repositories -cat > repositories.conf <<"EOT" -## Place your custom repositories here, they must match the architecture and version. -# src/gz chaos_calmer http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages -# src custom file:///usr/src/openwrt/bin/ar71xx/packages +# # Use local replication of repositories +# cat > repositories.conf <<"EOT" +# ## Place your custom repositories here, they must match the architecture and version. +# # src/gz chaos_calmer http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages +# # src custom file:///usr/src/openwrt/bin/ar71xx/packages -## Remote package repositories -src/gz chaos_calmer_base http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/base -src/gz chaos_calmer_luci http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/luci -#src/gz chaos_calmer_packages http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/packages -src/gz chaos_calmer_routing http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/routing -#src/gz chaos_calmer_telephony http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/telephony -#src/gz chaos_calmer_management http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/management +# ## Remote package repositories +# src/gz chaos_calmer_base http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/base +# src/gz chaos_calmer_luci http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/luci +# #src/gz chaos_calmer_packages http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/packages +# src/gz chaos_calmer_routing http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/routing +# #src/gz chaos_calmer_telephony http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/telephony +# #src/gz chaos_calmer_management http://localhost/openwrt/chaos_calmer/15.05.1/ar71xx/generic/packages/management -## This is the local package repository, do not remove! -src imagebuilder file:packages -EOT +# ## This is the local package repository, do not remove! +# src imagebuilder file:packages +# EOT cat > extra_files/etc/dropbear/authorized_keys < extra_files/etc/hotplug.d/button/01onoff <<"EOF" } EOF -cat > extra_files/etc/banner <<"EOF" - _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| - |__| W I R E L E S S F R E E D O M - ----------------------------------------------------- - CHAOS CALMER (15.05.1, 9a1fd3e 2017-03-09) - ----------------------------------------------------- - * 1 1/2 oz Gin Shake with a glassful - * 1/4 oz Triple Sec of broken ice and pour - * 3/4 oz Lime Juice unstrained into a goblet. - * 1 1/2 oz Orange Juice - * 1 tsp. Grenadine Syrup - ----------------------------------------------------- -EOF +# cat > extra_files/etc/banner <<"EOF" +# _______ ________ __ +# | |.-----.-----.-----.| | | |.----.| |_ +# | - || _ | -__| || | | || _|| _| +# |_______|| __|_____|__|__||________||__| |____| +# |__| W I R E L E S S F R E E D O M +# ----------------------------------------------------- +# CHAOS CALMER (15.05.1, 9a1fd3e 2017-03-09) +# ----------------------------------------------------- +# * 1 1/2 oz Gin Shake with a glassful +# * 1/4 oz Triple Sec of broken ice and pour +# * 3/4 oz Lime Juice unstrained into a goblet. +# * 1 1/2 oz Orange Juice +# * 1 tsp. Grenadine Syrup +# ----------------------------------------------------- +# EOF ####################### # Build Openwrt image # ####################### make clean -make image PROFILE=$profile PACKAGES="$PACKAGES" FILES="extra_files/" +make image PROFILE=$profile PACKAGES="$PACKAGES" FILES="extra_files/" V=99 res=$? echo if [ $res -eq 0 ] then echo "Image ready: " - ls -la bin/ar71xx/openwrt*ar71xx-generic-tl-*-v*-squashfs-* + ls -la bin/targets/ar71xx/generic/*ar71xx-generic-tl-*-v*-squashfs-* echo else echo "Something went wrong, sorry" fi diff --git a/maj/gen-dev.php b/maj/gen-dev.php index 2cedc71..70f6966 100644 --- a/maj/gen-dev.php +++ b/maj/gen-dev.php @@ -67,17 +67,17 @@ switch ($_POST['profile']) { case 'TLWR740': switch($_POST['revision']) { case '51': - $profile='TLWR740'; + $profile="DEVICE_tl-wr740n-v5"; $user_filename="mise-a-jour-routeur-TLWR740v5.1.bin"; - $gen_filename="bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v5-squashfs-factory.bin"; + $gen_filename="bin/targets/ar71xx/generic/lede-17.01.2-ar71xx-generic-tl-wr740n-v5-squashfs-factory.bin"; break; case '4': case '5': case '6': - $profile='TLWR740'; - $revision=$_POST['revision']; + $revision=str_replace('.', '', $_POST['revision']); + $profile="DEVICE_tl-wr740n-v$revision"; $user_filename="mise-a-jour-routeur-TLWR740v$revision.bin"; - $gen_filename="bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v$revision-squashfs-factory.bin"; + $gen_filename="bin/targets/ar71xx/generic/lede-17.01.2-ar71xx-generic-tl-wr740n-v$revision-squashfs-factory.bin"; break; default: $errors['revision'] = 'Routeur non supporté (' . (isset($_POST['revision'])?$_POST[$index]:'vide') . ')'; @@ -89,10 +89,10 @@ switch ($_POST['profile']) { case '9': case '10': case '11': - $profile='TLWR841'; $revision=$_POST['revision']; + $profile="DEVICE_tl-wr841-v$revision"; $user_filename="mise-a-jour-routeur-TLWR841v$revision.bin"; - $gen_filename="bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v$revision-squashfs-factory.bin"; + $gen_filename="bin/targets/ar71xx/generic/lede-17.01.2-ar71xx-generic-tl-wr841-v$revision-squashfs-factory.bin"; break; default: $errors['revision'] = 'Routeur non supporté (' . (isset($_POST['revision'])?$_POST[$index]:'vide') . ')'; diff --git a/maj/gen.php b/maj/gen.php index e888763..e2d8486 100644 --- a/maj/gen.php +++ b/maj/gen.php @@ -88,7 +88,7 @@ switch ($_POST['profile']) { switch($_POST['revision']) { case '9': case '10': - case '11': +/* case '11': XXX un 841n V11.1 a été briqué le 07/06/2017, à investiguer */ $profile='TLWR841'; $revision=$_POST['revision']; $user_filename="mise-a-jour-routeur-TLWR841v$revision.bin"; -- cgit v1.1