Overview

  1. 下载所有ipks
  2. 修改ipks
  3. 修改Packages
  4. 部署 本地 nginx
  5. 修改 opkg 配置,opkg update & install

=========草稿========开始-===========
mkdir -p /mnt/sdb1/packages
for file in ls
do
mkdir -p /tmp/mdipk
tar zxvf $file -C /tmp/mdipk/
mkdir -p /tmp/mdipk/control
tar zxvf /tmp/mdipk/control.tar.gz -C /tmp/mdipk/control
sed -i 's/ramips_24kec/ralink/' /tmp/mdipk/control/control
tar zcvf /tmp/mdipk/control.tar.gz -C /tmp/mdipk/control/ ./
tar zcvf /mnt/sdb1/modified/base/$file -C /tmp/mdipk ./control.tar.gz ./data.tar.gz ./debian-binary
rm -r /tmp/mdipk
done

rm -r /tmp/mdipk/control

tar zcvf /mnt/sda1/p/packages/$file -C /tmp/mdipk/

gzip -dc control.tar.gz |tar tvf -

tar zxvf 解压到指定文件夹

=========
修改 Packages base

for file in ls
do
m1=md5sum /mnt/sdb1/latest/base/$file | cut -c 1-32
m2=md5sum /mnt/sdb1/modified/base/$file | cut -c 1-32
sed -i "s/$m1/$m2/" Packages
echo $m1
echo $m2
echo $file
echo '-----ko'
done

libc 只能下载进行安装 不能通过opkg 安装
http://bbs.xiaomi.cn/thread-10834457-1-1.html
解决了 libc
上述两个东西也可以解决了

cd /tmp
wget

  1. base 修改

b='base'
echo $b
mkdir -p "/mnt/sdb1/latest/$b"
rm "/mnt/sdb1/latest/$b/Packages"
wget -P "/mnt/sdb1/latest/$b" "http://downloads.openwrt.org/latest/ramips/mt7620a/packages/$b/Packages"
cp "/mnt/sdb1/latest/$b/Packages" "/mnt/sdb1/modified/$b/Packages"
cd "/mnt/sdb1/modified/$b/"
sed -i 's/: ramips_24kec/: ralink/' "/mnt/sdb1/modified/$b/Packages"
for file in ls
do
m1=md5sum /mnt/sdb1/latest/$b/$file | cut -c 1-32
m2=md5sum /mnt/sdb1/modified/$b/$file | cut -c 1-32
sed -i "s/$m1/$m2/" Packages
echo $file
done

rm Packages.gz
tar zcvf Packages.gz Packages

  1. b=packages
  2. b=oldpackages
    b=oldpackages
    echo $b
    mkdir -p "/mnt/sda1/latest/$b"
    wget -P "/mnt/sda1/latest/$b" "http://downloads.openwrt.org/latest/ramips/mt7620a/packages/$b/Packages"
    cd "/mnt/sda1/latest/$b"
    cat Packages | grep 'Filename:' | sed "s/Filename: /wget http:\/\/downloads.openwrt.org\/latest\/ramips\/mt7620a\/packages\/$b\//" > downloadall.sh

Songlairui
159 声望2 粉丝

其过大小,有数百事。吾欲长生,铮铮不避。称心如意夶〰


引用和评论

0 条评论