NGW100mkII + buildroot 3.0 + jffs2

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello! I've used NGW100mkI + buildroot 2.3 for our purposes without any problems. GNU/Linux was on mtd1 (8Mb). mtd3(8Mb) was used for our application and its logs. I've used JFFS2 on these partitions.

I wanted to use the same scheme on NGW100mkII. I've compiled buildroot 3.0 with kernel 2.6.35.4. (with built-in JFFS2 support, NOT module). GNU/Linux is at the same place - mtd1(8Mb). Another flash (mtd3,256Mb) I wanted to use for our appplication (JFFS2 or UBIFS - no difference for me). But I have some problems:

U-Boot 2010.06 (Feb 16 2012 - 18:18:56)

U-Boot code: (null) -> 000119b4 data: 000189d0 -> 0004e2d0
VMR table @ 0x17fca21c
DMA: Using memory from 0x17f6d000 to 0x17f71000
Flash: 8 MiB at address 0x00000000
DRAM Configuration:
Bank #0: 10000000 128 MiB
In: serial
Out: serial
Err: serial
Net: macb0, macb1
Press SPACE to abort autoboot in 1 seconds
### JFFS2 loading '/boot/uImage' to 0x10400000
Scanning JFFS2 FS: ......... done.
### JFFS2 load complete: 1576807 bytes loaded to 0x10400000
## Booting kernel from Legacy Image at 10400000 ...
Image Name: Linux-2.6.35.4
Image Type: AVR32 Linux Kernel Image (gzip compressed)
Data Size: 1576743 Bytes = 1.5 MiB
Load Address: 10000000
Entry Point: 90000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel at 90000000 (params at 17f71008)...

Linux version 2.6.35.4 (ksanto@ksanto-computer) (gcc version 4.2.4-atmel.1.1.3.avr32linux.1) #1 Mon Feb 20 17:12:48 MSK 2012
CPU: AT32AP700x chip revision C
CPU: AP7 [01] core revision 0 (AVR32B arch revision 1)
CPU: MMU configuration: Shared TLB
CPU: features: dsp simd ocd perfctr java
CPU: Running at 140.000 MHz
Physical memory:
10000000-17ffffff
Reserved memory:
10000000-101ddd5b: Kernel code
101ddd5c-102990e7: Kernel data
Exception vectors start at 90015000
CPU: Paging enabled
Node 0: start_pfn = 0x10000, low = 0x18000
Node 0: mem_map starts at 9029c000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: root=mtd1 rootfstype=jffs2
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127280k/127280k available (1827k kernel code, 3792k reserved, 147k data, 84k init)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:288
avr32_comparator: irq 0, 140.000 MHz
console [ttyS0] enabled
Calibrating delay using timer specific routine.. 282.11 BogoMIPS (lpj=564222)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512
smc smc.0: Atmel Static Memory Controller at 0xfff03400
NET: Registered protocol family 16
pdc pdc.0: Atmel Peripheral DMA Controller enabled
at32_eic at32_eic.0: External Interrupt Controller at 0xfff00100, IRQ 19
at32_eic at32_eic.0: Handling 4 external IRQs, starting with IRQ 64
AVR32 AP Power Management enabled
bio: create slab at 0
Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) б╘ 2001-2006 Red Hat, Inc.
msgmni has been set to 248
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
atmel_usart.0: ttyS0 at MMIO 0xffe01000 (irq = 7) is a ATMEL_SERIAL
physmap platform flash device: 00800000 at 00000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x0041
atmel Features: 86
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x0000007f0000 : "root"
0x0000007f0000-0x000000800000 : "env"
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
Scanning device for bad blocks
Bad eraseblock 110 at 0x000000dc0000
Creating 1 MTD partitions on "atmel_nand":
0x000000000000-0x000010000000 : "main"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xffe00000 (irq 3)
mtd_dataflash spi0.0: AT45DB642x (8448 KBytes) pagesize 1056 bytes (OTP)
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfff01800 irq 25 (00:fd:b7:f5:00:fd)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
MACB_mii_bus: probed
eth1: Atmel MACB at 0xfff01c00 irq 26 (00:fd:b7:f5:00:fd)
eth1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:03, irq=-1)
atmel_usba_udc atmel_usba_udc.0: MMIO registers at 0xfff03000 mapped at fff03000
atmel_usba_udc atmel_usba_udc.0: FIFO at 0xff300000 mapped at ff300000
at32ap700x_rtc at32ap700x_rtc.0: rtc core: registered at32ap700x_rtc as rtc0
at32ap700x_rtc at32ap700x_rtc.0: Atmel RTC for AT32AP700x at fff00080 irq 21
at32_wdt at32_wdt.0: AT32AP700X WDT at 0xfff000b0, timeout 2 sec (nowayout=0)
dw_dmac.0: DesignWare DMA Controller, 3 channels
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
cpufreq: AT32AP CPU frequency driver
at32ap700x_rtc at32ap700x_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff02400 irq 28, 1 slots
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 84K (90000000 - 90015000)
mount: you must be root
mount: you must be root
mount: you must be root
mkdir: can't create directory '/dev/shm': File exists
mkdir: can't create directory '/dev/pts': File exists
mount: you must be root
/etc/init.d/rcS: /etc/init.d/S00bootstrap.sh: line 18: can't create /proc/sys/kernel/hotplug: nonexistent directory
mdev: /sys/class: No such file or directory
mount: you must be root
mount: you must be root
mount: you must be root
dmesg: klogctl: Operation not permitted
hostname: sethostname: Operation not permitted
ifconfig: SIOCSIFADDR: Permission denied
route: SIOCADDRT: Operation not permitted
chown: /tmp/avahi-autoipd: Operation not permitted
Starting portmap: done
Enabling USB CDC composite gadget...
modprobe: can't open '/proc/modules': No such file or directory
Starting network...
ip: RTNETLINK answers: Operation not permitted
ip: SIOCSIFFLAGS: Permission denied
ip: can't find device 'usb0'
ip: SIOCGIFFLAGS: No such device
Starting network time protocol daemon: ntpd.
Starting dropbear sshd: generating rsa key... generating dsa key... OK
Starting ProFTPD: warning: `proftpd' uses 32-bit capabilities (legacy support in use)
- warning: unable to determine IP address of '_none_'
- error: no valid servers configured
- Fatal: error processing configuration file '/etc/proftpd.conf'
FAILED

I think somethimg is wrong with filesystem or partition - its settings in buildroot,kernel or u-boot.

"mount: you must be root" at the place where
"init started: BusyBox v1.13.1" should be.

P.S. u-boot environment variables:
bootcmd=fsload 0x10400000 /boot/uImage;bootm
bootargs=root=mtd1 rootfstype=jffs2

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does /bin/busybox have the suid bit set, and owner is root?

E.g.

~ > ls -al /bin/busybox
-rwsr-xr-x 1 root root 1719048 2011-09-01 19:02 /bin/busybox

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hce, thanks. I did chown and everything works good.
I did't face with this problem before in buildroot 2.3.0 - I did JFFS2 image from rootfs without such changes.

Another question - about UBIFS. As I understand this file system is better for flash with size 16Mb+. What settings of UBIFS should be set? As I see from buildroot atngw100mkii_defconfig it should be so:

mkfs.ubifs -m 0x800 -e 0x1F000 -c 2048

Is it enough?

And about upgrade of NAND flash with this image. What is the best way? Usually I use AVR Dragon to update U-boot and JFFS2 image (on its address 0x20000). mtd1 also may be upgraded with u-boot + tftp. What about mtd3 here? Should it be erased before writing image and how can it be upgraded with by its address? (does it start at 128k+8000k+64k - 0x800000 ?)