页次: 1
各种尝试,现在开始整awboot。
问题:kernel zImage是从Tina linux里面拿过来的,可以使用uboot正常启动。为啥使用awboot启动就异常了?
log如下
[I] AWBoot r6165 starting...
[D] DRAM BOOT DRIVE INFO: V0.24
[D] DRAM CLK = 792 MHz
[D] DRAM Type = 3 (2:DDR2,3:DDR3)
[D] DRAMC read ODT off
[D] ZQ value = 0x30
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] single rank and full DQ
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] rank 0 row = 13
[D] para->dram_para1 = 0x10d2
[D] rank 0 bank = 8
[D] para->dram_para1 = 0x10d2
[D] rank 0 page size = 2 KB
[D] para->dram_para1 = 0x10d2
[D] DRAM ODT value: 0x42
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] DRAM: size = 128MB
[D] DRAM: simple test OK
[D] CLK: CPU PLL=PLL_CPU FREQ=1200MHz
[D] CLK: PLL_peri (2X)=1200MHz, (1X)=600MHz, (800M)=800MHz
[D] CLK: PLL_ddr=1584MHz
[D] DMA: init
[D] DMA: test OK in 24ms
[D] SPI: init
[D] SPI: set clock asked=100MHz actual=100MHz mclk=200MHz
[I] SPI-NAND: W25N01GV detected
[D] SPI-NAND: dt blob: Copy from 0x00040000 to 0x44000000 size:0x0000dc73
[I] SPI-NAND: read dt blob of size 56435 at 47.00MB/S
[D] SPI-NAND: Image: Copy from 0x00080000 to 0x44800000 size:0x003e03f8
[I] SPI-NAND: read Image of size 4064248 at 49.00MB/S
[I] booting linux...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.61 (root@a3715198cb35) (arm-openwrt-linux-muslgnueabi3
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: sun8iw20
[ 0.000000] printk: bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 16 MiB at 0x47000000
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] Bad mode in prefetch abort handler detected
[ 0.000000] Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP ARM
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.61 #54
[ 0.000000] Hardware name: Generic DT based system
[ 0.000000] PC is at 0xfff7fdc8
[ 0.000000] LR is at __invoke_psci_fn_smc+0x40/0x60
[ 0.000000] pc : [<fff7fdc8>] lr : [<c04c03f4>] psr: 600001d6
[ 0.000000] sp : c0a01e98 ip : c0a01ef0 fp : c6ffff40
[ 0.000000] r10: c0a0df8c r9 : c0b51c98 r8 : c0a00000
[ 0.000000] r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 00000000
[ 0.000000] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 84000000
[ 0.000000] Flags: nZCv IRQs off FIQs off Mode MON_32 ISA ARM Segment none
[ 0.000000] Control: 10c5387d Table: 4000406a DAC: c0a00000
[ 0.000000] Process swapper (pid: 0, stack limit = 0x(ptrval))
[ 0.000000] Stack: (0xc0a01e98 to 0xc0a02000)
[ 0.000000] 1e80: 84000000 000
[ 0.000000] 1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 c0a00000 c08
[ 0.000000] 1ec0: c0a0df8c c6ffff40 c0a01ef0 c0a01e98 c04c03f4 fff7fdc8 600001d6 fff
[ 0.000000] 1ee0: c0a00000 00000000 c0a4b180 c0a06d80 00000000 00000000 00000000 000
[ 0.000000] 1f00: c0a01f0c 00000000 c0a4b180 c04c064c c4000914 00000000 00000001 000
[ 0.000000] 1f20: c0a00000 c09180e0 c0a00000 c6ece450 c0a4b180 c0a06d80 c0a00000 c08
[ 0.000000] 1f40: c0a00000 c09184f4 c092e360 00000000 00000000 c09238fc c0a08218 c04
[ 0.000000] 1f60: ffffffff 10c5387d 40000000 c083bdec c0a03dc0 c0a4b000 410fc075 10d
[ 0.000000] 1f80: 00000000 c01552b8 c07cd9bd 00000000 00000001 c0900330 c0a00000 10d
[ 0.000000] 1fa0: c0a03dc0 c0a4b000 410fc075 10c5387d 00000000 c0900974 00000000 000
[ 0.000000] 1fc0: 00000000 00000000 00000000 c09270c0 00000000 00000000 c0900330 001
[ 0.000000] 1fe0: 10c0387d ffffffff 44000000 410fc075 10c5387d 00000000 00000000 000
[ 0.000000] [<c04c03f4>] (__invoke_psci_fn_smc) from [<c0a01e98>] (0xc0a01e98)
[ 0.000000] Code: bad PC value
[ 0.000000] random: get_random_bytes called from init_oops_id+0x20/0x40 with crng_i0
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]-
如题,默认情况下,引导参数mac_addr为空,导致每次进入系统会使用随机分配的mac地址,但是随机mac会导致下次路由器ip变动。
现在想在u-boot中设置mac_addr地址。然后内核解析这个参数设置mac地址,但是实际情况是uboot可以设置,但是内核无法解析出来。
[ 0.000000] Kernel command line: ubi.mtd=sys ubi.block=0,rootfs earlyprintk=sunxi-uart,0x02500C00 clk_ignore_unused initcall_debug=0 console=ttyS3,115200 loglevel=8 root=/dev/ubiblock0_5 rootfstype=squashfs init=/pseudo_init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env-redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:private@ubi0_6:rootfs_data@ubi0_7:UDISK@ubi0_8: cma=4M snum= mac_addr=E6:62:2C:5B:92:4E wifi_mac= bt_mac= specialstr= gpt=1 androidboot.hardware=sun8iw20p1 boot_type=5 androidboot.boot_type=5 gpt=1 uboot_message=2018.05-g2a1965a-dirty-config-dirty(12/09/2023-13:48:45) mbr_offset=1032192 disp_reserve=1536000,0x43eff000 aw-ubi-spinand.ubootblks=24 androidboot.dramsize=128
查看代码lichee/linux-5.4/drivers/net/ethernet/allwinner/sunxi-gmac.c
__setup("mac_addr=", set_mac_addr); 没有被调用,因为宏MODULE未定义。内核 make kernel_menuconfig 也没找到这个 MODULE 定义的配置项。
#ifdef MODULE
static int __init set_mac_addr(char *str)
{
char *p = str;
if (str && strlen(str))
memcpy(mac_str, p, 18);
return 0;
}
__setup("mac_addr=", set_mac_addr);
#endif
有谁知道啥原因?帮忙看看,谢谢!
[ 3.171636] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 3.182074] devtmpfs: mounted
[ 3.187281] Freeing unused kernel memory: 1024K
[ 3.198786] Run /sbin/init as init process
can't run '/etc/init.d/rcS': No such file or directory
can't open /dev/tts/0: No such file or directory
can't open /dev/tty1: No such file or directory
[ 4.198671]
[ 4.198671] insmod_device_driver
[ 4.198671]
[ 4.205846] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
[ 4.217900] device_chose finished 142!
can't open /dev/tts/0: No such file or directory
can't open /dev/tty1: No such file or directory
can't open /dev/tty1: No such file or directory
看init.d文件夹里面确实没有 rcS 这个文件
Tina-Linux/out/t113-mq_r/compile_dir/target/rootfs/etc/init.d/
[ 3.171636] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[ 3.182074] devtmpfs: mounted
[ 3.187281] Freeing unused kernel memory: 1024K
[ 3.198786] Run /sbin/init as init process
can't run '/etc/init.d/rcS': No such file or directory
can't open /dev/tts/0: No such file or directory
can't open /dev/tty1: No such file or directory
[ 4.198671]
[ 4.198671] insmod_device_driver
[ 4.198671]
[ 4.205846] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
[ 4.217900] device_chose finished 142!
can't open /dev/tts/0: No such file or directory
can't open /dev/tty1: No such file or directory
can't open /dev/tty1: No such file or directory
为啥全志的很多开源库停止更新了?比如Wiki描述的uboot 2019年之后就不变了 -> https://linux-sunxi.org/U-Boot/Changelog
github更是早就不更新了: https://github.com/linux-sunxi/linux-sunxi
难道现在都需要注册从官网下载么?
我是小白,刚开始玩全志芯片,对这些历史不太了解,感觉有点乱。有谁知道的,能不能大概介绍一下?
如题,比如Wiki描述的uboot 2019年之后就不变了 -> https://linux-sunxi.org/U-Boot/Changelog
github更是早就不更新了:https://github.com/linux-sunxi/linux-sunxi
难道现在都需要注册从官网下载么?
我是小白,刚开始玩全志芯片,对这些历史不太了解,感觉有点乱。有谁知道的,能不能大概介绍一下?
页次: 1