Index: head/sys/mips/conf/TP-WN1043ND =================================================================== --- head/sys/mips/conf/TP-WN1043ND (revision 227920) +++ head/sys/mips/conf/TP-WN1043ND (revision 227921) @@ -1,30 +1,31 @@ # # TP-1043ND -- Kernel configuration file for the TP-Link WR-1043ND # # $FreeBSD$ # # Include the default AR913x parameters common to all AR913x SoC users. include "AR91XX_BASE" ident TP-WN1043ND # Override hints with board values hints "TP-WN1043ND.hints" # Force the board memory - 32mb options AR71XX_REALMEM=32*1024*1024 # read MSDOS formatted disks - USB options MSDOSFS options GEOM_PART_BSD options GEOM_PART_MBR -# Just make sure the thing boots off of the first attached SCSI device for now! -#options ROOTDEVNAME=\"ufs:da0a\" -# Or an MDROOT for testing. -options MD_ROOT -options MD_ROOT_SIZE=5120 +# uzip - to boot natively from flash device geom_uzip options GEOM_UZIP -options ROOTDEVNAME=\"ufs:/dev/md0.uzip\" + +# Used for the static uboot partition map +device geom_map + +# Boot off of the rootfs, as defined in the geom_map setup. +options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" Index: head/sys/mips/conf/TP-WN1043ND.hints =================================================================== --- head/sys/mips/conf/TP-WN1043ND.hints (revision 227920) +++ head/sys/mips/conf/TP-WN1043ND.hints (revision 227921) @@ -1,19 +1,73 @@ # # This file adds to the values in AR91XX_BASE.hints. # # $FreeBSD$ # Hard-code the PHY for now, until there's switch phy support. hint.arge.0.phymask=0x000c hint.arge.0.media=1000 hint.arge.0.fduplex=1 # Where is the MAC address stored in flash for this particular unit. hint.arge.0.eeprommac=0x1f01fc00 # This isn't used, but configure it anyway. # This should eventually just not be configured, but the if then # needs to be properly disabled or spurious interrupts occur. hint.arge.1.phymask=0x0 # Where the ART is hint.ath.0.eepromaddr=0x1fff1000 + +# +# Define a slightly custom flash layout. + +# The default flash layout: +# +# 128k: uboot +# 1024k: kernel +# 4096k: rootfs +# 2880k: unknown +# 64k: ART +# +# from printenv: +# bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init +# mtdparts=ar9100-nor0:128k(u-boot),1024k(kernel),4096k(rootfs),64k(art) + +# This isn't a lot of space! +# So: +# 128k: uboot +# 2048k: kernel +# 5888k: rootfs +# (todo: 64k: config) +# 64k: ART + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x000200000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00020000 +hint.map.1.end=0x00220000 +hint.map.1.name="kernel" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00220000 +#hint.map.2.end=0x007e0000 +hint.map.2.end=0x007f0000 +hint.map.2.name="rootfs" +hint.map.2.readonly=1 + +#hint.map.3.at="flash/spi0" +#hint.map.3.start=0x007e0000 +#hint.map.3.end=0x007f0000 +#hint.map.3.name="cfg" +#hint.map.3.readonly=1 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x007f0000 +hint.map.4.end=0x00800000 +hint.map.4.name="art" +hint.map.4.readonly=1