Hi,
I have this device which i am trying to add support to.
And i cannot figure out the nand block in dts file and the definition of device in generic image and the platform command to upgrade.
Help would be much appreciated.
original boot log
sections
## Booting kernel from FIT Image at 84000000 ...
Using 'config@ap.dk01.1-c2' configuration
Trying 'kernel@1' kernel subimage
Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
Using 'config@ap.dk01.1-c2' configuration
Trying 'fdt@ap.dk01.1-c2' FDT blob subimage
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x842b8cd4
Uncompressing Kernel Image ... OK
Loading Device Tree to 86ff4000, end 86fff07c ... OK
Using machid 0x8010100 from environment
Starting kernel ...
[ 0.948478] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0x12
[ 0.953829] nand: Macronix MX35LFxGE4AB 128MiB 3.3V
[ 0.958662] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[ 0.964342] Scanning device for bad blocks
[ 1.249570] random: nonblocking pool is initialized
[ 1.742097] 6 gww2-nand partitions found on MTD device spi0.1
[ 1.746806] Creating 6 MTD partitions on "spi0.1":
[ 1.751632] 0x000003000000-0x000005000000 : "rootfs"
[ 1.757746] mtd: device 11 (rootfs) set to be root filesystem
[ 1.762500] 0x000000000000-0x000002000000 : "rootfs2"
[ 1.768624] 0x000006100000-0x000006200000 : "NVRAM"
[ 1.773608] 0x000006200000-0x000006300000 : "NVRAM2"
[ 1.778632] 0x000006300000-0x000006b00000 : "PRIV_FLASH"
[ 1.784066] 0x000007d00000-0x000007e00000 : "dummy"
[ 1.789883] nf_conntrack version 0.5.0 (3696 buckets, 14784 max)
[ 1.829510] UBI: attaching mtd11 to ubi0
[ 2.756149] UBI: scanning is finished
[ 2.800632] UBI: attached mtd11 (name "rootfs", size 32 MiB) to ubi0
[ 2.805955] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2.812762] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 2.819432] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2.826266] UBI: good PEBs: 255, bad PEBs: 1, corrupted PEBs: 0
[ 2.832188] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[ 2.839307] UBI: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 643604216
[ 2.848229] UBI: available PEBs: 31, total reserved PEBs: 224, PEBs reserved for bad PEB handling: 19
[ 2.857476] UBI: background thread "ubi_bgt0d" started, PID 69
[ 2.863081] clk: Not disabling unused clocks
[ 2.878391] VFS: Mounted root (squashfs filesystem) readonly on device 31:18.
[ 2.885011] Freeing unused kernel memory: 160K (c070d000 - c0735000)
[ 5.613796] NVRAM-driver Rev : 1.0.8
this is original printenv
(IPQ40xx) # printenv
base_mac=01:07:89:81:F0:16
baudrate=115200
boot_info=0
bootargs=bootpart=1 base_mac=01:07:89:81:F0:16 boot_info=0 quiet ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait
bootcmd=bootipq
bootdelay=0
bootpart=1
fdt_high=0x87000000
flash_type=0
fsbootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs
machid=8010100
mtddevname=bank1
mtddevnum=0
mtdids=nand1=nand1
mtdparts=mtdparts=nand1:0x2000000@0x0(bank1),0x2000000@0x3000000(bank2),
partition=nand1,0
priv_bootargs=bootpart=1 base_mac=01:07:89:81:F0:16 boot_info=0 quiet
serialnum=TNIEAP-201804066915
stderr=serial
stdin=serial
stdout=serial
uboot_ver=11
ubi info
(IPQ40xx) # ubi part bank1;ubi info
Creating 1 MTD partitions on "nand1":
0x000000000000-0x000002000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: MTD device name: "mtd=0"
UBI: MTD device size: 32 MiB
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: number of good PEBs: 256
UBI: number of bad PEBs: 0
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 0
UBI: available PEBs: 250
UBI: total number of reserved PEBs: 6
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 1/0
here is my dts block
flash@1 {
compatible = "jedec,spi-nand", "spinand,mt29f";
#address-cells = <1>;
#size-cells = <1>;
reg = <1>;
spi-max-frequency = <24000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "rootfs";
reg = <0x0 0x02000000>;
};
partition@3000000 {
label = "rootfs2";
reg = <0x03000000 0x02000000>;
};
partition@6100000 {
label = "NVRAM";
reg = <0x06100000 0x00100000>;
};
partition@6200000 {
label = "NVRAM2";
reg = <0x06200000 0x00100000>;
};
partition@6300000 {
label = "PRIV_FLASH";
reg = <0x06300000 0x00800000>;
};
partition@7d00000 {
label = "dummy";
reg = <0x07d00000 0x00100000>;
};
};
};
and this is my generic image section.
define Device/ipq4018_device
$(call Device/FitzImage)
$(call Device/UbiFit)
DEVICE_VENDOR := IPQ4018
DEVICE_MODEL := Device
SOC := qcom-ipq4018
DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 32768k
FILESYSTEMS := squashfs
KERNEL_IN_UBI := 1
UBINIZE_OPTS := -E 5
IMAGES := factory.ubi sysupgrade.bin
IMAGE/factory.ubi := append-ubi | pad-to 2048
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := ipq-wifi-ipq4018-device kmod-usb-acm
endef
TARGET_DEVICES += ipq4018_device
this is as far as i understood