[LEDE-DEV] [PATCHv2] ipq806x: add support for ZyXEL NBG6817

Andre Valentin avalentin at marcant.net
Fri Oct 21 00:15:20 PDT 2016


Hi Felix!

Am 19.10.2016 um 21:43 schrieb Felix Fietkau:
>>>> thanks for your comments. Please take a look:
>>>>
>>>> Am 18.10.2016 um 08:22 schrieb John Crispin:
>>>>
>>>>>> +++ b/target/linux/ipq806x/base-files/lib/preinit/04_set_mtd_ipq806x.sh
>>>>>> @@ -0,0 +1,21 @@
>>>>>> +#
>>>>>> +# Copyright (C) 2009 OpenWrt.org
>>>>>> +#
>>>>>> +
>>>>>> +. /lib/ipq806x.sh
>>>>>> +. /lib/functions/system.sh
>>>>>> +
>>>>>> +preinit_assign_mtd2block() {
>>>>>> +	case $(ipq806x_board_name) in
>>>>>> +		nbg6817)
>>>>>> +			echo "/dev/mmcblk0p2,64KiB,romd" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			echo "/dev/mmcblk0p3,64KiB,header" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			echo "/dev/mmcblk0p4,64KiB,kernel" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			echo "/dev/mmcblk0p6,64KiB,header_1" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			echo "/dev/mmcblk0p7,64KiB,kernel_1" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			echo "/dev/mmcblk0p8,64KiB,rootfs_1" > /sys/module/block2mtd/parameters/block2mtd
>>>>>> +			;;
>>>>>> +	esac
>>>>>> +}
>>>>>> +
>>>>>
>>>>> can this not go into the commandline inside the devicetree ?
>>>> I tried, but block2mtd accepts only one mapping in the command line.
>>>>
>>>> I will rework the patch the next days and send an update.
>>> Why do we need block2mtd at all for this target?
>>
>> The system uses an internal mmc for storage of root fs and other data. I saw that the rb532 platform also uses block2mtd for this.
>> With ubi on top of it, everything including sysupgrade worked nearly out of the box. That's why I preferred to use existing parts.
>> If you have another idea, please tell. For me it's my first mmc based platform.
> MMC is just a block device like any other. Please take a look at octeon,
> mvebu or x86 as examples of how to do it without block2mtd.

I have switched rootfs now to squashfs, that ist working. But I have problems with the overlayfs.
It is on /dev/mmcblk0p1, but I do not understand how to tell the system to use this partition. I cannot find a matching example.

What I did:
1) Added an fstab to the squassh image:
config 'global'
	option	anon_swap	'0'
	option	anon_mount	'0'
	option	auto_swap	'1'
	option	auto_mount	'1'
	option	delay_root	'5'
	option	check_fs	'0'

config 'mount'
	option device	'/dev/mmcblk0p1'
	option enabled '1'
	option target '/overlay'
	option fstype 'ext4'
	option options 'rw,sync'
	option enabled_fsck 0
	option is_rootfs '1'

2) label the ext4fs rootfs_data
3) added rootfs_data=/dev/mmcblk0p1 on kernel commandline.

But fstools does not mount it.
Please help.

Kind regards,

André




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3711 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161021/fab1adcf/attachment-0001.p7s>


More information about the Lede-dev mailing list