Go to file
Jonas Gorski ee76bd11bb images: fix boot failures on NAND with small sub pages
SquashFS has a minimum block size of at least 1k, so we need to make
sure the last data block is also at least that big.

This is not an issue on NOR or SD CARD devices, since their rootfs
partitions go all the way to the end of the usable space.

But on NAND with ubiblock, the rootfs partition will be the exact space,
rounded up to LEB size. Unfortunately, some NAND chips with small sub
pages have a LEB size of x.5 kiB. This can cause the the last data block
to be less than 1k, which will cause the last block to be inaccessible,
causing boot failures as seen on MR24:

[    1.532960] block ubiblock0_3: created from ubi0:3(rootfs)
[    1.538457] ubiblock: device ubiblock0_3 (rootfs) set to be root filesystem
[    1.552847] SQUASHFS error: squashfs_read_data failed to read block 0x621472
[    1.559896] squashfs: SQUASHFS error: unable to read id index table
[    1.566474] VFS: Cannot open root device "(null)" or unknown-block(254,0): error -5

Since on most NOR devices, the start of the squashfs partition is not
aligned. Since the start of the rootfs_data partition there is dependend
on the SquashFS size, we cannot just always pad it, as the padding could
creep into the rootfs_data partition, breaking jffs2.

So fix this by ensuring a squashfs rootfs is always a multiple of 1k
only for UBI and NAND sysupgrade images.

Fixes #2460 without affecting NOR devices.

Tested-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2019-09-14 11:43:19 +02:00
.github build: Update README & github help 2018-07-08 09:41:53 +01:00
config config: kernel: only enable container features if !SMALL_FLASH 2019-09-12 13:17:24 +02:00
include kernel: bump 4.19 to 4.19.72 2019-09-13 16:40:29 +02:00
package odhcpd: fix update to git HEAD 2019-09-12 22:37:54 +02:00
scripts images: fix boot failures on NAND with small sub pages 2019-09-14 11:43:19 +02:00
target ar71xx: fix potential IRQ misses during dispatch for qca953x 2019-09-13 16:40:29 +02:00
toolchain glibc: update to latest 2.27 commit (BZ #24228, BZ #24744, BZ #24699) 2019-09-08 22:18:17 +02:00
tools tools/mkimage: Update U-Boot to version 2019.07 2019-09-04 22:35:22 +02:00
.gitattributes add .gitattributes to prevent the git autocrlf option from messing with CRLF/LF in files 2012-05-08 13:30:49 +00:00
.gitignore .gitignore: add .project & .cproject for eclipse users 2018-01-17 11:07:17 +01:00
BSDmakefile add missing copyright header 2007-02-26 01:05:09 +00:00
Config.in merge: base: update base-files and basic config 2017-12-08 19:41:18 +01:00
LICENSE finally move buildroot-ng to trunk 2016-03-20 17:29:15 +01:00
Makefile build: add buildinfo files for reproducibility 2019-08-13 10:40:36 +02:00
README build: switch to Python 3 2019-07-26 08:09:16 +02:00
feeds.conf.default feeds: switch git.lede-project.org URLs to git.openwrt.org 2018-01-16 16:59:22 +01:00
rules.mk librpc: remove package 2019-01-22 13:29:46 +01:00

README

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------

This is the buildsystem for the OpenWrt Linux distribution.

To build your own firmware you need a Linux, BSD or MacOSX system (case
sensitive filesystem required). Cygwin is unsupported because of the lack
of a case sensitive file system.

You need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff,
unzip, gawk, getopt, subversion, libz-dev and libc headers installed.

1. Run "./scripts/feeds update -a" to obtain all the latest package definitions
defined in feeds.conf / feeds.conf.default

2. Run "./scripts/feeds install -a" to install symlinks for all obtained
packages into package/feeds/

3. Run "make menuconfig" to select your preferred configuration for the
toolchain, target system & firmware packages.

4. Run "make" to build your firmware. This will download all sources, build
the cross-compile toolchain and then cross-compile the Linux kernel & all
chosen applications for your target system.

Sunshine!
	Your OpenWrt Community
	http://www.openwrt.org