The ubi command comes from busbox.
As follows:
Since ubifs occupies its own space, it is impossible to use all 128M, so only 100M=104857600 Bytes is used temporarily.
~#flash_eraseall /dev/mtd1
Use ramdisk to start the kernel, and copy the file system to nand flash via USB.
After ramdisk starts the kernel, insert USB:
mount -t vfat /dev/uba1 /mnt
tar -zxvf /mnt/rootfs-busy1.20.tar.gz -C /media
:
/sbin/ubiattach /dev/ubi_ctrl -m 1
/bin/mount -t ubifs /dev/ubi0_0 /media/
reboot
u-boot, boot parameters:
setenv bootargs ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc console=ttyS0,115200
The kernel is successfully booted.
After the ubifs is successfully transplanted, yaffs2 can be abandoned. After half a month, I finally transplanted the self-made fs and ubifs to at91sam926x, and I am in a good mood.
## Booting kernel from Legacy Image at 20400000 ...
Image Name: Linux-3.6.9
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1990904 Bytes = 1.9 MiB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
……
atmel_usart.0: ttyS0 at MMIO 0xfffff200 (irq = 17) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 22) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 23) is a ATMEL_SERIAL
……
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "Partition 1"
0x000000040000-0x000008000000 : "Partition 2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: max. sequence number: 58
UBI: attached mtd1 to ubi0
UBI: MTD device name: "Partition 2"
UBI: MTD device size: 127 MiB
UBI: number of good PEBs: 915
UBI: number of bad PEBs: 107
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 39
UBI: total number of reserved PEBs: 876
UBI: number of PEBs reserved for bad PEB handling: 18
UBI: max/mean erase counter: 2/1
UBI: image sequence number: 1228014130
UBI: background thread "ubi_bgt0d" started, PID 855
……
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 36, io mem 0x00500000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
rtc-at91sam9 rtc-at91sam9.0: rtc core: registered rtc-at91sam9 as rtc0
i2c /dev entries driver
at91sam9_wdt: sorry, watchdog is disabled
at91_wdt: probe of at91_wdt failed with error -5
softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
……
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 108767232 bytes (106218 KiB, 103 MiB, 843 LEBs)
UBIFS: journal size: 5419008 bytes (5292 KiB, 5 MiB, 42 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 4952683 bytes (4836 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:8.
Freeing init memory: 120K
running /etc/init.d/rcS
starting udevd...
cannot open /dev/null
udevd (898): /proc/898/oom_adj is deprecated, please use /proc/898/oom_score_adj instead.
/etc/init.d/rcS: line 21: /sbin/ubiattach: not found
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Please press Enter to activate this console.
Previous article:STM32F4 starts debugging USART, ADC-DMA
Next article:uC/GUI initialization settings based on STM32F10x
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Oh my god! My air conditioner has become a spirit!
- Analysis of the problem that the program cannot run after F28004x online debugging reset
- Ask for 88X3310PA1-BUS4I000 product manual
- The problem of BIN generated by STM32F051 being filled with 0
- Wireless RF communication using nRF24L01 module
- Today at 10:00 AM, live broadcast with awards: ADI's technologies and products in China's energy internet applications
- How to perform on-site PIM testing on RF connectors?
- IAR IDE for MSP430, 8051, ARM and other platforms
- There is a chip shortage now. Are there any domestic chips that can replace this buck-boost chip from Lingte? LTC1517ES5-3.3, SOT...
- MSP430 MCU Development Record (7)