[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Status of Debian on QNAP



It seems that message from Karsten Sperling never made it to
debian-arm.

* Karsten Sperling <karsten@sperling.co.nz> [2020-12-30 13:33]:
> Thanks,
> 
> turns out overriding the MTD layout via the kernel command line works. In
> case anyone else finds this useful, these are the U-Boot environment
> settings I'm using to merge RootFS1 and RootFS2. I'm setting both mtd2 and
> mtd3 to be the combined RootFS1+2 (i.e. the two partitions overlap) so that
> mtd4 and 5 also keep their numbers / device names and no change is needed
> to fw_env.config or flash-kernel.
> 
> bootargs_mtdparts cmdlinepart.mtdparts="physmap-flash.0:512K@7680K
> (U-Boot)ro,2M@0(Kernel),5M@2M(RootFS1),5M@2M(RootFS2),128K@7552K(U-Boot
> Config),384K@7M(NAS Config)ro"
> fsargs setenv bootargs console=ttyS0,115200n8 root=/dev/ram rw
> initrd=0x800000,0x500000 $(bootargs_mtdparts)
> prefs cp.b 0xff200000 0x800000 0x500000
> 
> It's probably a good idea to zero out RootFS2 (mtd3) before applying this
> as I'm not sure the kernel tolerates trailing garbage in the initrd.
> 
> For some reason the system still doesn't boot up correctly with the stock
> 4.19.0-13-marvell kernel though, but I didn't have time to look into why
> yet.
> 
> On Mon, 21 Dec 2020 at 22:44, Martin Michlmayr <tbm@cyrius.com> wrote:
> 
> > * Karsten Sperling <karsten@sperling.co.nz> [2020-12-16 12:06]:
> > > By pinning lvm to the stretch version I got the initrd to just below 5M,
> > so
> > > it would fit into a combined RootFS1+RootFS2 partition. It looks like on
> > > the u-boot side I would just need to bump the initrd size from 0x3fffff
> > > to 0x4fffff in the cp command and the kernel command line, but is there a
> > > way to override the partition table the kernel uses? The TS-209 doesn't
> > use
> > > a device tree.
> >
> > You'd have to edit arch/arm/mach-orion5x/ts209-setup.c and compile
> > your own kernel, but I'm not sure it's worth it.
> >
> > OTOH, since RootFS2 is right behind RootFS1, you could manually split
> > the ramdisk and write the first 4 MB to RootFS1 and the remaining 1 MB
> > to RootFS2.  This way, you could keep the Debian kernel and just need
> > to change u-boot.
> >
> > --
> > Martin Michlmayr
> > https://www.cyrius.com/
> >

-- 
Martin Michlmayr
https://www.cyrius.com/


Reply to: