找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3998|回复: 10

为什么我编译的lean源代码没有刷机用个2个bin文件呢?

[复制链接]
本帖最后由 ago 于 2018-10-24 20:37 编辑

mips-openwrt-linux-musl-objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -R .MIPS.abiflags -S loader loader.bin
mips-openwrt-linux-musl-ld -r -b binary --oformat elf32-tradbigmips -o loader2.o loader.bin
mips-openwrt-linux-musl-ld -z max-page-size=0x1000 -e startup -T loader2.lds -Ttext 0x80060000 -o loader.elf loader2.o
make[7]: Leaving directory '/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/lzma-loader'
cp -fpR /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/lzma-loader/loader.elf /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/loader-generic.elf
make[6]: Leaving directory '/home/h/lede-master/target/linux/ar71xx/image/lzma-loader'
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux.elf /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-vmlinux.elf
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-vmlinux.bin
dd if=/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux.bin.lzma of=/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-vmlinux.lzma bs=65536 conv=sync
20+1 records in
21+0 records out
1376256 bytes (1.4 MB, 1.3 MiB) copied, 0.00117527 s, 1.2 GB/s
mkimage -A mips -O linux -T kernel -a 0x80060000 -C lzma  -e 0x80060000 -n 'MIPS OpenWrt Linux-4.9.134' -d /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux.bin.lzma /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-uImage-lzma.bin
Image Name:   MIPS OpenWrt Linux-4.9.134
Created:      Mon Oct 22 12:12:22 2018
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    1374944 Bytes = 1342.72 KiB = 1.31 MiB
Load Address: 80060000
Entry Point:  80060000
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/loader-generic.elf /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-vmlinux-lzma.elf
mkdir -p /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp
/home/h/lede-master/staging_dir/host/bin/mksquashfs4 /home/h/lede-master/build_dir/target-mips_24kc_musl/root-ar71xx /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2  -b 256k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -processors 1 -fixed-time 1540210342
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs, block size 262144.
Pseudo file "/dev" exists in source filesystem "/home/h/lede-master/build_dir/target-mips_24kc_musl/root-ar71xx/dev".
Ignoring, exclude it (-e/-ef) to override.
[=========================================================================================================================================================================================-] 1438/1438 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
        compressed data, compressed metadata, compressed fragments, no xattrs
        duplicates are removed
Filesystem size 11011.90 Kbytes (10.75 Mbytes)
        28.11% of uncompressed filesystem size (39175.98 Kbytes)
Inode table size 14388 bytes (14.05 Kbytes)
        22.96% of uncompressed inode table size (62677 bytes)
Directory table size 19070 bytes (18.62 Kbytes)
        46.78% of uncompressed directory table size (40765 bytes)
Number of duplicate files found 154
Number of inodes 1805
Number of files 1328
Number of fragments 34
Number of symbolic links  346
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 130
Number of ids (unique uids + gids) 1
Number of uids 1
        root (0)
Number of gids 1
        root (0)
rm -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/vmlinux /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin
/home/h/lede-master/staging_dir/host/bin/patch-cmdline /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin 'board=TL-WR703N  console=ttyATH0,115200'
search space used is default of 16KB
/home/h/lede-master/staging_dir/host/bin/lzma e /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin -lc1 -lp2 -pb2  /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin.new
[ -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin -a -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs ]
dd if=/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs >> /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin
22023+1 records in
22023+1 records out
11276184 bytes (11 MB, 11 MiB) copied, 0.127381 s, 88.5 MB/s
/home/h/lede-master/staging_dir/host/bin/mktplinkfw -H 0x07030101 -W 0x1 -F 8Mlzma -N OpenWrt -V unknown -m 1 -k /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin -r /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin -o /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin.new -j -X 0x40000 -a 0x4  -s && mv /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin.new /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin || rm -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin
[mktplinkfw] rootfs offset aligned to 0x1375648
[mktplinkfw] *** error: images are too big by 4787511 bytes
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin
cp: cannot stat '/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin': No such file or directory
Makefile:69: recipe for target '/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin' failed
make[5]: [/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin] Error 1 (ignored)
[ -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin -a -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs ]
dd if=/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs >> /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin
22023+1 records in
22023+1 records out
11276184 bytes (11 MB, 11 MiB) copied, 0.123381 s, 91.4 MB/s
/home/h/lede-master/staging_dir/host/bin/mktplinkfw -H 0x07030101 -W 0x1 -F 8Mlzma -N OpenWrt -V unknown -m 1 -k /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tl-wr703n-v1-kernel.bin -r /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin -o /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin.new -j -X 0x40000 -a 0x4   && mv /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin.new /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin || rm -f /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin
[mktplinkfw] rootfs offset aligned to 0x1375648
[mktplinkfw] *** error: images are too big by 4787511 bytes
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin
cp: cannot stat '/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/tmp/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin': No such file or directory
Makefile:69: recipe for target '/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin' failed
make[5]: [/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin] Error 1 (ignored)
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs-raw
cp /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs-64k
/home/h/lede-master/staging_dir/host/bin/padjffs2 /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs-64k 64
padding image to 00ad0000
/home/h/lede-master/staging_dir/host/bin/padjffs2 /home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs 4 8 16 64 128 256
padding image to 00ac1000
padding image to 00ac2000
padding image to 00ac4000
padding image to 00ad0000
padding image to 00ae0000
padding image to 00b00000
dd if=/home/h/lede-master/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/root.squashfs of=/home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-root.squashfs bs=128k conv=sync
88+1 records in
89+0 records out
11665408 bytes (12 MB, 11 MiB) copied, 0.0179144 s, 651 MB/s
IPKG_NO_SCRIPT=1 IPKG_INSTROOT=/home/h/lede-master/build_dir/target-mips_24kc_musl/root.orig-ar71xx TMPDIR=/home/h/lede-master/build_dir/target-mips_24kc_musl/root.orig-ar71xx/tmp /home/h/lede-master/staging_dir/host/bin/opkg --offline-root /home/h/lede-master/build_dir/target-mips_24kc_musl/root.orig-ar71xx --force-postinstall --add-dest root:/ --add-arch all:100 --add-arch mips_24kc:200 list-installed > /home/h/lede-master/bin/targets/ar71xx/tiny/openwrt-ar71xx-tiny-device-tl-wr703n-v1.manifest
make[5]: Leaving directory '/home/h/lede-master/target/linux/ar71xx/image'
make[4]: Leaving directory '/home/h/lede-master/target/linux/ar71xx'
make[3]: Leaving directory '/home/h/lede-master/target/linux'
time: target/linux/install#515.72#32.22#894.63
make[2]: Leaving directory '/home/h/lede-master'
make[1]: Leaving directory '/home/h/lede-master'
h@ho:~/lede-master$


其他文件都有,就缺刷机的两个factory和sysupgrade文件呢?难道是我选择的是8Mbin,现在做出来超过8M了,打包失败?
选择16M的bin就没事?
[mktplinkfw] rootfs offset aligned to 0x1375648
[mktplinkfw] *** error: images are too big by 4787511 bytes
回复

使用道具 举报

 楼主| | 显示全部楼层
keke1023 发表于 2018-10-24 21:14
[mktplinkfw] rootfs offset aligned to 0x1375648
[mktplinkfw] *** error: images are too big by 47875 ...

是这样的,最开始我成功编译的是16M的bin,后来觉得文件有点大,就改成编译8M的bin。
然后就一直报错,8M的bin编译不了。
必须要make dirclean,从0开始编译才可以。
请问如何在8Mbin和16Mbin之间任意切换呢?
改了文件,也没有的。
回复

使用道具 举报

ago 发表于 2018-10-24 21:42
是这样的,最开始我成功编译的是16M的bin,后来觉得文件有点大,就改成编译8M的bin。
然后就一直报错,8 ...

切换就是更改机型的定义文件里闪存的大小啊,我记得只要编译前改就可以,也不用clean(因为我把8m改16m就是这样的)
回复

使用道具 举报

 楼主| | 显示全部楼层
keke1023 发表于 2018-10-24 21:46
切换就是更改机型的定义文件里闪存的大小啊,我记得只要编译前改就可以,也不用clean(因为我把8m改16m就 ...

对呀,我就是这样子的啊。
但是从16m改成8m,并没有8m的文件生成。依然是16m的bin生成。
我所以就很郁闷啊。
回复

使用道具 举报

本帖最后由 401626436 于 2019-1-6 13:08 编辑

         

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

 楼主| 来自手机 | 显示全部楼层
401626436 发表于 2018-10-24 23:07
target/linux/系列列如ramips/image/芯片列如mt7621.mk里面找到对应型号找到IMAGE_SIZE修改成想要的大小即 ...

我之前一直做的8m的bin,都挺正常。
后来试了一下16m的bin也正常。
然后就回不去8m的bin了。
我选的集成内容都变少了的。
但是现在8m的bin始终说我文件太大了。必须做成16m的。
make dirclean以后,也是不行。
回复

使用道具 举报

清除缓存,清除配置重新配置。
回复

使用道具 举报

隶笔难书 发表于 2018-10-26 01:10
清除缓存,清除配置重新配置。

老铁 命令是啥
回复

使用道具 举报

本帖最后由 隶笔难书 于 2019-11-20 21:28 编辑

https://www.right.com.cn/forum/thread-207733-1-1.html

回复

使用道具 举报


谢谢老板                              
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-24 06:45

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表