村委会书记 发表于 2020-3-31 17:53:19

SD卡烧写的rootfs.tar.bz2是那种格式文件系统?

板子是OK335XD,用SD卡烧写rootfs.tar.bz2,这个烧写的是什么格式文件系统,是yaffs,还是yaffs2。

村委会书记 发表于 2020-3-31 18:13:26

应该是yaffs2。但是现在有一个问题:
用的你们的核心板,我们的底板,板子现在如果在nand flash上写操作的时候突然断电偶尔就会起不来,到文件系统哪里的时候就挂载不上,这不知道和文件系统是不是有关系?

zhichao 发表于 2020-4-1 08:45:19

到文件系统挂载不上,应该是和文件系统有关系,应该是影响了文件系统挂载

村委会书记 发表于 2020-4-1 10:40:40

zhichao 发表于 2020-4-1 08:45
到文件系统挂载不上,应该是和文件系统有关系,应该是影响了文件系统挂载

可是不知道是设么关系:dizzy:
现在想重新分区,但是照着你们那个分区文档修改完arch/arm/mach-omap2/board-am335xevm-xd.c之后,到文件系统哪里也起不来,如下:
[    1.669131] Netfilter messages via NETLINK v0.30.
[    1.674155] nf_conntrack version 0.5.0 (7986 buckets, 31944 max)
[    1.680904] ctnetlink v0.93: registering with nfnetlink.
[    1.687162] xt_time: kernel timezone is -0000
[    1.691988] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.697737] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
[    1.704450] arp_tables: (C) 2002 David S. Miller
[    1.709349] TCP cubic registered
[    1.712744] NET: Registered protocol family 17
[    1.717430] Registering the dns_resolver key type
[    1.722418] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    1.730417] ThumbEE CPU extension supported.
[    1.734950] mux: Failed to setup hwmod io irq -22
[    1.740571] Power Management for AM33XX family
[    1.745466] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[    1.752151] Copied the M3 firmware to UMEM
[    1.756501] Cortex M3 Firmware Version = 0x181
[    1.766364] clock: disabling unused clocks to save power
[    1.774155] Detected MACID=f8:36:9b:10:13:14
[    1.779766] cpsw: Detected MACID = f8:36:9b:10:13:16
[    1.787182] rtc-ds1307 1-0068: setting system clock to 2000-01-01 00:11:19 UTC (946685479)
[    1.796512] yaffs: dev is 32505863 name is "mtdblock7" rw
[    1.802191] yaffs: passed flags ""
[    1.933020] VFS: Mounted root (yaffs2 filesystem) on device 31:7.
[    1.946274] devtmpfs: error mounting -2
[    1.951149] Freeing init memory: 620K
[    2.197847] Kernel panic - not syncing: No init found.Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    2.210854] Backtrace:
[    2.213446] [<c0017d98>] (dump_backtrace+0x0/0x110) from [<c054c940>] (dump_stack+0x18/0x1c)
[    2.222263]r6:c004174c r5:c079e730 r4:c0831b10 r3:c07c60c8
[    2.228193] [<c054c928>] (dump_stack+0x0/0x1c) from [<c054c9b0>] (panic+0x6c/0x1a0)
[    2.236197] [<c054c944>] (panic+0x0/0x1a0) from [<c0008700>] (init_post+0xa8/0xd8)
[    2.244102]r3:df02bc00 r2:00000009 r1:00000080 r0:c06513b8
[    2.250018]r7:00000013
[    2.252692] [<c0008658>] (init_post+0x0/0xd8) from [<c0704910>] (kernel_init+0x128/0x130)
[    2.261230]r4:c079e730 r3:00000028
[    2.264986] [<c07047e8>] (kernel_init+0x0/0x130) from [<c004174c>] (do_exit+0x0/0x67c)

zhichao 发表于 2020-4-1 11:21:11

您修改的是不是有问题,您可以试试不修改直接编译烧写,看看是否正常,如果正常就是修改的有问题

村委会书记 发表于 2020-4-1 11:45:34

本帖最后由 村委会书记 于 2020-4-1 11:47 编辑

zhichao 发表于 2020-4-1 11:21
您修改的是不是有问题,您可以试试不修改直接编译烧写,看看是否正常,如果正常就是修改的有问题正常这个代码编译、烧写是没问题的,我参照《新建一个yaffs2分区并挂载.txt》中的这部分内容:
一、新建一个分区,步骤如下:
1、内核代码修改:arch/arm/mach-omap2/board-am335xevm.c

/* partition information */
static struct mtd_partition am335x_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
      {
                .name         = "SPL",
                .offset         = 0,                        /* Offset = 0x0 */
                .size         = SZ_512K * 4,
      },
      {
                .name         = "SPL.backup1",
                .offset         = MTDPART_OFS_APPEND,      /* Offset = 0x200000 */
                .size         = SZ_512K * 4,
      },
      {
                .name         = "SPL.backup2",
                .offset         = MTDPART_OFS_APPEND,      /* Offset = 0x400000 */
                .size         = SZ_512K * 4,
      },
      {
                .name         = "SPL.backup3",
                .offset         = MTDPART_OFS_APPEND,      /* Offset = 0x600000 */
                .size         = SZ_512K * 4,
      },
      {
                .name         = "U-Boot",
                .offset         = MTDPART_OFS_APPEND,   /* Offset = 0x800000 */
                .size         = 4 * SZ_512K,
      },
      {
                .name         = "U-Boot Env",
                .offset         = MTDPART_OFS_APPEND,   /* Offset = 0xa00000 */
                .size         = 4 * SZ_512K,
      },
      {
                .name         = "Kernel",
                .offset         = MTDPART_OFS_APPEND,   /* Offset = 0xc00000 */
                .size         = 16 * SZ_512K,
      },
      {
                .name         = "File System",            /* Offset = 0x1400000 */
                .offset         = MTDPART_OFS_APPEND,   
                .size         = 420 * SZ_512K,
      },
      {
                .name         = "User File",
                .offset         = MTDPART_OFS_APPEND,
                .size         = MTDPART_SIZ_FULL,
      },
};
重新编译内核,将新生成的镜像替换原有镜像,烧写到核心板。
编译方法见 光盘资料中的 linux用户手册


修改了下,唯一的区别就是你们文档让修改board-am335xevm.c,我根据实际情况修改的是board-am335xevm-xd.c,重新烧写uImage,就这样了。。。

zhichao 发表于 2020-4-1 14:22:39

我刚刚试了一下,没有问题,您重启一下开发板试试,检查一下是不是其他地方有改动

村委会书记 发表于 2020-4-1 15:29:15

本帖最后由 村委会书记 于 2020-4-2 14:42 编辑

zhichao 发表于 2020-4-1 14:22
我刚刚试了一下,没有问题,您重启一下开发板试试,检查一下是不是其他地方有改动
好的.......

村委会书记 发表于 2020-4-1 17:47:10

本帖最后由 村委会书记 于 2020-4-2 14:44 编辑

zhichao 发表于 2020-4-1 14:22
我刚刚试了一下,没有问题,您重启一下开发板试试,检查一下是不是其他地方有改动
你好,哪个出错问题是因为文件系统太大,分区较小的原因。但是现在又有一个新的问题,如下可以看到ubi可以正常挂载,但是yaffs2的有问题:
root@ok335x:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               398.4M    310.1M   88.4M78% /
tmpfs                  16.0M      1.3M   14.7M   8% /var/volatile
tmpfs                  16.0M         0   16.0M   0% /media/ram
/dev/ubi1_0            12.1M   28.0K   11.4M   0% /rootfs0
/dev/ubi1_1            12.1M   28.0K   11.4M   0% /rootfs1
/dev/ubi1_2             463.4M   28.0K    458.6M   0% /rootfs2
root@ok335x:/# umount rootfs0/
[ 2073.707381] UBIFS: un-mount UBI device 1, volume 0
root@ok335x:/# mount -t yaffs2 /dev/ubi1_0 /rootfs0/
mount: mounting /dev/ubi1_0 on /rootfs0/ failed: Block device required
root@ok335x:/# mount -t yaffs2 /rootfs0/
mount: can't find /rootfs0/ in /etc/fstab
root@ok335x:/# mount -t yaffs /rootfs0/
mount: can't find /rootfs0/ in /etc/fstab
root@ok335x:/# mount -t yaffs /dev/ubi1_0 /rootfs0/
mount: mounting /dev/ubi1_0 on /rootfs0/ failed: Block device required
我修改/etc/fstab,添加:
/dev/ubi1_0          /rootfs0            yaffs2   defaults             00
之后,继续挂载,还是出错:
root@ok335x:/# mount -t yaffs2 /rootfs0/
mount: mounting /dev/ubi1_0 on /rootfs0 failed: Block device required
root@ok335x:/# cat /etc/fstab
# stock fstab - you probably want to override this with a machine specific one

rootfs               /                  auto       defaults            11
proc               /proc                proc       defaults            00
devpts               /dev/pts             devpts   mode=0620,gid=5       00
usbfs                /proc/bus/usb      usbfs      defaults            00
tmpfs                /var/volatile      tmpfs      defaults,size=16M   00
tmpfs                /dev/shm             tmpfs      mode=0777             00
tmpfs                /media/ram         tmpfs      defaults,size=16M   00
/dev/ubi1_0          /rootfs0            yaffs2   defaults                   00

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto00
页: [1]
查看完整版本: SD卡烧写的rootfs.tar.bz2是那种格式文件系统?